Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in bottles #6144

Merged
merged 2 commits into from
May 20, 2019
Merged

Fix bug in bottles #6144

merged 2 commits into from
May 20, 2019

Conversation

xu-cheng
Copy link
Member

@xu-cheng xu-cheng commented May 17, 2019

Before:

$ brew ruby -e 'p HOMEBREW_BOTTLE_DEFAULT_DOMAIN'
nil

After:

$ brew ruby -e 'p HOMEBREW_BOTTLE_DEFAULT_DOMAIN'
"https://homebrew.bintray.com"

Closes https://github.com/Homebrew/linuxbrew-core/issues/13110.

/cc @sjackman

@@ -13,7 +13,7 @@

BOTTLE_ERB = <<-EOS.freeze
bottle do
<% if !["#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles", "https://homebrew.bintray.com/bottles"].include?(root_url) %>
<% if !root_url.start_with?(HOMEBREW_BOTTLE_DEFAULT_DOMAIN) %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's this bit for? Not disagreeing just curious.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code has a purpose. Part of the macOS bottling pipeline runs on Linux, where HOMEBREW_BOTTLE_DEFAULT_DOMAIN is https://linuxbrew.bintray.com/bottles. We can end up with the opposite problem, where we'd have root_url "https://homebrew.bintray.com/bottles" in bottles.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code has a purpose. Part of the macOS bottling pipeline runs on Linux, where HOMEBREW_BOTTLE_DEFAULT_DOMAIN is https://linuxbrew.bintray.com/bottles.

It is no longer in this case as we now set HOMEBREW_FORCE_HOMEBREW_ON_LINUX in brew test-bot.

Further, reverting this would also help to remove superfluous root_url in linuxbrew/xorg and linuxbrew/extra.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me if/when it's fine with @sjackman.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me then. Thanks, @xu-cheng.

@@ -13,7 +13,7 @@

BOTTLE_ERB = <<-EOS.freeze
bottle do
<% if !["#{HOMEBREW_BOTTLE_DEFAULT_DOMAIN}/bottles", "https://homebrew.bintray.com/bottles"].include?(root_url) %>
<% if !root_url.start_with?(HOMEBREW_BOTTLE_DEFAULT_DOMAIN) %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code has a purpose. Part of the macOS bottling pipeline runs on Linux, where HOMEBREW_BOTTLE_DEFAULT_DOMAIN is https://linuxbrew.bintray.com/bottles. We can end up with the opposite problem, where we'd have root_url "https://homebrew.bintray.com/bottles" in bottles.

@sjackman
Copy link
Member

Thanks for this fix, @xu-cheng!

This reverts commit e4f4e0f.

This is no longer necessary as `HOMEBREW_FORCE_HOMEBREW_ON_LINUX`
is set when uploading bottles for Homebrew.
@MikeMcQuaid MikeMcQuaid merged commit 7f4aefe into Homebrew:master May 20, 2019
@MikeMcQuaid
Copy link
Member

Thanks again @xu-cheng!

@xu-cheng xu-cheng deleted the bottle branch May 20, 2019 19:53
@lock lock bot added the outdated PR was locked due to age label Jan 1, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Superfluous root_url in the formulae bottle block
3 participants